/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jse;

import enums.Season;

/**
 *
 * @author WangShuai
 */
public class EnumTest {

    public static void main(String[] args) {
        //Enum比较用=和equals方法均可
//        Season s1 = Season.spring;
//        Season s2 = Season.spring;
//        System.out.println(s1 == s2);  //true
//        System.out.println(s1.equals(s2));//true
        //没有相应的Enum对象会出现异常 No enum const class enums.Season.springs
        System.out.println( Season.valueOf("springs"));   
       
    }
}
